/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-01-25
 * Time:21:12
 */

public class Test {
    public boolean isPalindrome(int x) {
        if (x < 0 || (x % 10 == 0 && x != 0)) {
            return false;
        }
        int circle = 0;
        while (x > circle) {
            circle =circle* 10 + x % 10;
            x /= 10;
        }
        return x==circle||x==circle/10;
    }
}
